#include "datauser.h"

#include <QVariant>

void User::parseRecord(const QSqlRecord& record)
{
    this->setId(record.value(0).toInt());
    this->setCurrentVocabularyId(record.value(1).toInt());
    this->setGroupSize(record.value(2).toInt());
    this->setCurrentVocabularyName(record.value(3).toString().toStdString());
    this->setCurrentGroup(record.value(4).toInt());
}

const std::string &User::currentVocabularyName() const
{
    return m_currentVocabularyName;
}

void User::setCurrentVocabularyName(const std::string &newCurrentVocabularyName)
{
    m_currentVocabularyName = newCurrentVocabularyName;
}

int User::currentGroup() const
{
    return m_currentGroup;
}

void User::setCurrentGroup(int newCurrentGroup)
{
    m_currentGroup = newCurrentGroup;
}

int User::id() const
{
    return m_id;
}

void User::setId(int newId)
{
    m_id = newId;
}

int User::currentVocabularyId() const
{
    return m_currentVocabularyId;
}

void User::setCurrentVocabularyId(int newCurrentVocabularyId)
{
    m_currentVocabularyId = newCurrentVocabularyId;
}

int User::groupSize() const
{
    return m_groupSize;
}

void User::setGroupSize(int newGroupSize)
{
    m_groupSize = newGroupSize;
}

